<template>
  <div class="outer">
    <!-- 给子组件添加内容 -->
    <Tab v-for="tabItem in tabData" v-bind="tabItem" :key="tabItem.index" />
    <!-- 
      v-bind :
      v-on   @
     -->
  </div>
</template>

<script>
import  Tab from './components/Tab'
import { v4 as uuidv4} from 'uuid'

export default {
  name: "App",
  data(){
    return {
      tabData: [
        { id: uuidv4(), title: "美食", list: ["火锅", "烧烤", "小龙虾"] },
        { id: uuidv4(), title: "游戏", list: ["LoL", "DNF", "CS", "Dota"] },
        {
          id: uuidv4(),
          title: "电影",
          list: ["独行月球", "智取威虎山", "绿皮书"],
        },
      ],
    }
  },
  components: {
    Tab
  },
  methods: {
    
  },
};
</script>

<style scoped>
/* scoped  当前文件可以使用*/
.outer {
   height: 400px;
  background: yellowgreen; 
  display: flex;
  justify-content: space-around;
}
</style>

